/* 更新CSS变量 */
:root {
    --primary-color: #4F46E5;  /* 更现代的主色调 */
    --secondary-color: #10B981; /* 清新的辅助色 */
    --accent-color: #F59E0B;
    --text-dark: #1E293B;
    --text-light: #F8FAFC;
    --gradient-primary: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

/* ===== 数据统计卡片 ===== */
.stats-grid {
    gap: 2rem;
    margin: 3rem 0;
}

.stat-card {
    background: var(--gradient-primary);
    padding: 2rem;
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 2.5rem;
    padding: 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: rotate(15deg);
}

.stat-content h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ===== 时间线 ===== */
.timeline-section {
    position: relative;
    padding: 4rem 0;
    background: linear-gradient(to bottom right, #F8FAFC 0%, #F1F5F9 100%);
}

.timeline::before {
    background: var(--primary-color);
    width: 3px;
    box-shadow: 0 0 10px rgba(79,70,229,0.3);
}

.timeline-item {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.4s ease;
}

.timeline-item.in-view {
    opacity: 1;
    transform: translateX(0) !important;
}

.timeline-item:nth-child(odd) {
    transform: translateX(-30px);
}

.timeline-item:nth-child(even) {
    transform: translateX(30px);
}

.timeline-date {
    top: -15px;
    left: -25px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* ===== 合作伙伴展示 ===== */
.partners-grid {
    gap: 3rem;
    padding: 3rem;
    background: rgba(241,245,249,0.5);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.partners-grid::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 60%, rgba(79,70,229,0.05));
}

.partners-grid img {
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.partners-grid img:hover {
    filter: grayscale(0);
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* ===== 志愿者故事轮播 ===== */
.story-carousel {
    gap: 2.5rem;
    padding-bottom: 2rem;
    mask-image: linear-gradient(
            to right,
            transparent 0%,
            black 10%,
            black 90%,
            transparent 100%
    );
}

.story-card {
    width: 320px;
    padding: 2rem;
    background: white;
    border: 1px solid #E2E8F0;
    position: relative;
    transition: transform 0.3s ease;
}

.story-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: var(--gradient-primary);
    z-index: -1;
    transform: rotate(-2deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.story-card:hover {
    transform: translateY(-8px);
}

.story-card:hover::before {
    opacity: 0.1;
}

blockquote {
    font-size: 1.1rem;
    line-height: 1.7;
    position: relative;
    padding-left: 2rem;
}

blockquote::before {
    content: "“";
    position: absolute;
    left: -1.5rem;
    top: -1rem;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.3;
}

/* ===== 联系信息区块 ===== */
.contact-section {
    gap: 3rem;
    margin-top: 6rem;
}

.contact-map {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.contact-map::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid white;
    pointer-events: none;
    border-radius: 16px;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem 1.5rem;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.contact-form button {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== 响应式优化 ===== */
@media (max-width: 768px) {
    .timeline-item {
        width: 90% !important;
        left: 10% !important;
        margin: 2rem 0;
    }

    .story-carousel {
        mask-image: none;
    }

    .contact-form button {
        width: 100%;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #F8FAFC;
        --text-light: #1E293B;
    }

    .stat-card,
    .timeline-item,
    .story-card {
        background: rgba(30,41,59,0.8);
        border-color: rgba(255,255,255,0.1);
    }

    .partners-grid {
        background: rgba(15,23,42,0.5);
    }
}